﻿@model Promocot.Models.Usuario_Rol

@{
    ViewBag.Title = "rol_usuario";
}

<h2>rol_usuario</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Usuario_Rol</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.Usuario.nombre)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(p => p.cod_usuario, new SelectList(ViewBag.usuarios,"cod_usuario","nombre"))
            @Html.ValidationMessageFor(model => model.cod_usuario)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.cod_rol)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor( p => p.cod_rol, new SelectList(ViewBag.roles,"cod_rol","nombre"))
            @Html.ValidationMessageFor(model => model.cod_rol)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.asociado_a)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.asociado_a)
            @Html.ValidationMessageFor(model => model.asociado_a)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

